use std::vec;

pub struct IterPlus {}

impl IterPlus {
    pub fn to_vec<P>(iter: &mut dyn Iterator<Item = P>) -> Vec<P> {
        let mut result_vec = vec![];
        loop {
            match iter.next() {
                Some(p) => result_vec.push(p),
                None => break,
            }
        }
        return result_vec;
    }
}